package com.deercrowing.takeaway.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.deercrowing.takeaway.entity.AddressEntity;

import java.util.List;

/**
 * 地址表(Address)表服务接口
 *
 * @author guoyongxiang
 * @since 2024-07-19 09:41:26
 */
public interface AddressService extends IService<AddressEntity> {

    /**
     * 根据用户ID查询地址列表
     *
     * @param id
     * @return
     */
    List<AddressEntity> searchByUserId(Long id);

    /**
     * 添加ID、UserID，保存实体类数据
     *
     * @param addressEntity
     */
    void saveInfo(AddressEntity addressEntity);

    /**
     * 设置默认收货地址
     *
     * @param addressEntity
     */
    void setDefaultAddress(AddressEntity addressEntity);

    AddressEntity searchDefaultAddressByUserId(Long id);
}

